package com.itheima.controller;

import com.itheima.common.R;
import com.itheima.pojo.Dish;
import com.itheima.service.DishService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;

/**
 * @author Envy
 */
@RestController
@RequestMapping("/dish")
public class DishController {
    @Resource
    private DishService dishService;

    /**
     * 菜品列表
     */
    @GetMapping("/list")
    public R<List<Dish>> selectDish(@RequestParam String categoryId, @RequestParam Integer status) {
        return dishService.selectDish(categoryId, status);
    }
}
